package com.netbao.testeasypoi;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;

import java.util.Date;

/**
 * @author zhouxp
 * @create 2019-06-06 9:22
 */
@Data
public class Person  {

    private String  id;

    @Excel(name = "姓名", orderNum = "0")
    private String name;

    @Excel(name = "性别", replace = {"男_1", "女_2"}, orderNum = "1")
    private Integer sex;

    @Excel(name = "生日", exportFormat = "yyyy-MM-dd",importFormat = "yyyy-MM-dd", orderNum = "2")
    private Date birthday;

    @Excel(name="状态",replace = {"正常_0", "错误_1"}, orderNum = "3")
    private Integer state;

    public Person(){}

    public Person(String name, Integer sex, Date birthday, Integer state) {
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.state = state;
    }

    public Person(String id, String name, Integer sex, Date birthday, Integer state) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.state = state;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", birthday=" + birthday +
                ", state=" + state +
                '}';
    }
}

